const initialState = {
  count: 0,
};

export const createCountSlice = (set, get) => ({
  ...initialState,
  increment: () =>
    set((state) => {
      state.count = state.count + 1;
    }),
  decrement: () =>
    set((state) => {
      state.count = state.count - 1;
    }),
  reset: () => set(() => initialState),
});
